<%--
  @desc: 应用列表首页
  @author: chenw
  @create: 2014-4-29 下午 15:32
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="/WEB-INF/taglib/econsole" prefix="econsole" %>
<div class="pageHeader">
    <form rel="pageForm" onsubmit="return dialogSearch(this);" action="<c:url value='/monitor/record/${query.APIId}'/>"
          method="post">
        <div class="searchBar">
            <ul>
                
                <li style="float: left;line-height: 25px;">
                    <label style="width:60px;">监控时间：</label>
                    <input name="start" type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss"
                           value="<fmt:formatDate value="${query.start}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                           placeholder="起始时间"
                           style="width:100px;font-family:'微软雅黑 sans-serif serif';"/>
                    -
                    <input name="end" type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss"
                           value="<fmt:formatDate value="${query.end}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                           placeholder="结束时间"
                           style="width:100px;font-family:'微软雅黑 sans-serif serif';"/>
                </li>
                
                <li style="float: left;line-height: 25px;">
                    <div class="buttonActive" style="margin-left: 5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent" style="padding-top: 1px;">
    <div class="panelBar">
        
    </div>
    <table class="table" width="100%" layoutH="114" >
        <thead>
        <tr>
          
            <th width="150" >监控时间</th>
            <th width="150">接口状态</th>
            <th width="150">访问耗时（毫秒）</th>
            
        </tr>
        </thead>
        <tbody>
        <c:forEach var="record" items="${pager.list}" varStatus="vs">
            <tr target="sel_id" >
                <td width="150"><fmt:formatDate value="${record.JKDate}" pattern="yyyy-MM-dd HH:mm"/></td>
                <td width="150" ><c:if test="${record.status eq 1}">
                正常
                </c:if> <c:if test="${record.status eq -1}">
                异常
                </c:if></td>
                <td width="150" >${record.reponseTime}</td>
                
                
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span>
            <select id="cob_ps" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="dialog" totalCount="${pager.total}" numPerPage="${pager.numPerPage}"
             pageNumShown="10"
             currentPage="${pager.pageNum}"></div>
    </div>
    

    <form id="pagerForm" method="post" action="<c:url value='/monitor/record/${query.APIId}'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
        <input type="hidden" name="status" value="${pager.status}">
        <input type="hidden" name="keywords" value="${query.keywords}"/>
        <input type="hidden" name="start"
               value="<fmt:formatDate value="${query.start}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
        <input type="hidden" name="end" value="<fmt:formatDate value="${query.end}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
        <input type="hidden" name="orderDirection" value="${query.orderDirection}"/>
        <input type="hidden" name="APIId" value="${query.APIId}">
        
    </form>
</div>
